package com.yixq.springboot.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.yixq.springboot.bean.SpringBootUserLog;

public interface SpringBootUserLogDao extends JpaRepository<SpringBootUserLog, Integer>{

	@Query(value="select u from SpringBootUserLog u where u.userName=?1")
	SpringBootUserLog findByUserName(String string);
	
	SpringBootUserLog findByUserNameAndUserIp(String string, String ip);

	Page<SpringBootUserLog> findByUserName(String string, Pageable pageable);
}
